Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 8 Forum

Notes/Domino 8 Forum

Previous Next

Example

Directly from notes help (isOpen)

import lotus.domino.*;
public class JavaAgent extends AgentBase {

public void isitopen(Database db) throws NotesException {
if (db.isOpen())
System.out.println("\"" + db.getTitle() +
"\" is open");
else
System.out.println("\"" + db.getTitle() +
"\" is not open"); }
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
DbDirectory Dir = session.getDbDirectory(null);
Database db =
Dir.getFirstDatabase(DbDirectory.DATABASE);
isitopen(db);
db.open();
isitopen(db);
} catch(Exception e) {
e.printStackTrace();
}
}
}


Feedback response number WEBB7KDCJJ created by ~Tip Minreplopynds on 10/13/2008

failed to access local database thr... (~Hank Chuveluyn... 13.Oct.08)
. . Example (~Tip Minreplopy... 13.Oct.08)
. . . . this is not a solution that we expe... (~Hank Chuveluyn... 13.Oct.08)
. . . . . . doesn't matter (~Tip Minreplopy... 13.Oct.08)
. . . . . . . . called db.open method, but still er... (~Hank Chuveluyn... 14.Oct.08)
. . . . . . . . . . it picks the lotus/Domino/data as t... (~Hank Chuveluyn... 14.Oct.08)
. . the error "database has not been op... (~Bill Frokimari... 13.Oct.08)
. . . . default nsf path is not ../Notes/da... (~Hank Chuveluyn... 15.Oct.08)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS